﻿#pragma once
#include "SCustomList.h"
#include "Components/Widget.h"
#include "UCustomListUMG.generated.h"

UCLASS()
class UCustomListUMG: public UWidget
{
	GENERATED_BODY()
public:
	UCustomListUMG();
	
	//加载界面
	virtual TSharedRef<SWidget> RebuildWidget() override;
	//UMG列表栏
	virtual const FText GetPaletteCategory() ;
	
	//面板设置完毕后会触发此事件,字面的意思是同步属性
	virtual void SynchronizeProperties() override;
	//资源释放
	virtual void ReleaseSlateResources(bool bReleaseChildren) override;
	//更新信息
	
	UFUNCTION(BlueprintCallable, Category = "Appearance")
	void UpDataList(TMap<FString,FCustomListInfo> ListData);
	
	UFUNCTION(BlueprintCallable, Category = "Appearance")
	void MySynchronizeProperties();
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "表格标题名字"))
	FString Title = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱一的名字"))
	FString OneInfo = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱二的名字"))
	FString TwoInfo = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱三的名字"))
	FString ThreeInfo = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱四的名字"))
	FString CustomInfo = "";
	//表格主体
	TSharedPtr<SCustomList> CustomList;

	//自定义的数值峰值
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "最大值"))
	int32 MaxValue;
	//区间
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "递增区间"))
	int32 GrowValue;
	//警戒值
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "警戒值"))
	int32 WarningValue;
	//显示警戒线
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "显示警戒线"))
	bool ShowWarningLine = false;
	//显示折线
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "显示折线"))
	bool ShowZheLine = false;
	//显示圆
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "显示圆"))
	bool ShowYuan = false;
	//柱子的个数
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (ClampMin = 1, ClampMax = 4,DisplayName = "柱子个数"))
	int32 PillarNum = 1;
	//柱子背景
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数",meta = (DisplayName = "柱子背景"))
	bool PillarBg = true;
	//显示标题
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数",meta = (DisplayName = "显示标题行"))
	bool ShowTitle = true;
	
};
